import { IsString, IsNumber, IsOptional, Min } from 'class-validator';
import { ApiProperty } from '@nestjs/swagger';

export class CreateProductDto {
  @ApiProperty({ description: '商品名称' })
  @IsString()
  name: string;

  @ApiProperty({ description: '商品价格' })
  @IsNumber()
  @Min(0)
  price: number;

  @ApiProperty({ description: '商品描述' })
  @IsString()
  @IsOptional()
  description?: string;

  @ApiProperty({ description: '库存数量' })
  @IsNumber()
  @Min(0)
  stock: number;

  @ApiProperty({ description: '所属商店ID' })
  @IsNumber()
  shopId: number;
} 